package cn.bgs.controller;


import cn.bgs.common.R;
import cn.bgs.pojo.InvestmentProcess;
import cn.bgs.service.InvestmentProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 招商流程表 前端控制器
 * </p>
 *
 * @author Mr.Zhao
 * @since 2022-08-08
 */
@RestController
@RequestMapping("/investment-process")
public class InvestmentProcessController {

    @Autowired
    private InvestmentProcessService investmentProcessService;

    @GetMapping("/findInvestmentProcess")
    public R findInvestmentProcess(@RequestParam String inProInfo, @RequestParam String inProCompany){
        return investmentProcessService.findInvestmentProcess(inProInfo, inProCompany);
    }

    @GetMapping("/findInvestmentProcessId")
    public R findInvestmentProcessId(Integer id){
        return investmentProcessService.findInvestmentProcessId(id);
    }

    @GetMapping("/delInvestmentProcess")
    public R delInvestmentProcess(@RequestParam Integer id){
        return investmentProcessService.delInvestmentProcess(id);
    }

    @PostMapping("/addInvestmentProcess")
    public R addInvestmentProcess(@RequestBody InvestmentProcess investmentProcess){
        return investmentProcessService.addInvestmentProcess(investmentProcess);
    }

    @PostMapping("/updateInvestmentProcess")
    public R updateInvestmentProcess(@RequestBody InvestmentProcess investmentProcess){
        return investmentProcessService.updateInvestmentProcess(investmentProcess);
    }
}

